<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<script type="text/javascript">
$().ready(function() {
	// validate signup form on keyup and submit
	$("#userForm").validate({
		rules: {
			nombre: "required",
			apellidos: "required",
			email: {
				required: true,
				email: true
			},
			nif: "required"
		}
	});
});
</script>
<div id="explanation">
<h3><span><fmt:message key="users.user_info"/></span></h3>
<fieldset>
	<legend><fmt:message key="users.user_info"/></legend>
	<form:form action="" method="POST" modelAttribute="user" id="userForm" commandName="user">
		<form:hidden path="id_usuario"/>
	
		<form:label path="email" for="email" cssErrorClass="error"><fmt:message key="users.email"/>: </form:label><br/>
		<form:input path="email"/><form:errors path="email" cssClass="error" /><br/>

		<form:label path="nombre" for="nombre" cssErrorClass="error"><fmt:message key="general.name"/>: </form:label><br/>
		<form:input path="nombre"/><form:errors path="nombre" cssClass="error"/><br/>

		<form:label path="apellidos" for="apellidos" cssErrorClass="error"><fmt:message key="general.surname"/>: </form:label><br/>
		<form:input path="apellidos"/><form:errors path="apellidos"/><br/>

		<form:label path="nif" for="nif" cssErrorClass="error"><fmt:message key="users.id"/>: </form:label><br/>
		<form:input path="nif"/><form:errors path="nif"/><br/>
		
		<hr/>

		<form:label path="calle" for="calle" cssErrorClass="error"><fmt:message key="users.street"/>: </form:label><br/>
		<form:input path="calle"/><form:errors path="calle"/><br/>

		<form:label path="instrucciones" for="instrucciones" cssErrorClass="error"><fmt:message key="users.instructions"/>: </form:label><br/>
		<form:input path="instrucciones"/><form:errors path="instrucciones"/><br/>

		<form:label path="cp" for="cp" cssErrorClass="error"><fmt:message key="users.pc"/>: </form:label><br/>
		<form:input path="cp"/><form:errors path="cp"/><br/>

		<form:label path="ciudad" for="ciudad" cssErrorClass="error"><fmt:message key="users.city"/>: </form:label><br/>
		<form:input path="ciudad"/><form:errors path="ciudad"/><br/>

		<form:label path="provincia" for="provincia" cssErrorClass="error"><fmt:message key="users.province"/>: </form:label><br/>
		<form:input path="provincia"/><form:errors path="provincia"/><br/>

		<form:label path="ccaa" for="ccaa" cssErrorClass="error"><fmt:message key="users.state"/>: </form:label><br/>
		<form:input path="ccaa"/><form:errors path="ccaa"/><br/>

		<form:label path="telefono" for="telefono" cssErrorClass="error"><fmt:message key="users.phone"/>: </form:label><br/>
		<form:input path="telefono"/><form:errors path="telefono"/><br/>		
		
		<form:label path="movil" for="movil" cssErrorClass="error"><fmt:message key="users.mobile"/>: </form:label><br/>
		<form:input path="movil"/><form:errors path="movil"/><br/>		
		
		<input type="submit" value='<fmt:message key="general.add"/>'/>

	</form:form>

</fieldset>

</div>